Learning to Program with Alice


Chapter 1


Concept: Virtual world
Video games and simulations can be either two or three dimensional (2D or 3D). You may have used a 2D graphic simulator in a driver education course. A video game or simulation implementaed in 3D is called a virtual world. Using a virtual world lends a sense of reality to the simulator and increases tis effectiveness.

An Alice virtual world begins with a template for an initial scene. The templates are shown in the opening windown when Alice is started.

Concept: Objects and 3D models
Part of the fun of using Alice is to use your imagination to create new worlds. Begin with a simple scene and add objects. Some objects provide a setting and other objects play the role of actors in your script (that is, they move around and perform various actions during the animation).

To make it easy to create a new world and populate it with all kinds of objects, the Alice developers have provided a huge number of 3D models. In a way, a 3D model is like a blueprint used to design a house.

The installation of Alice on your computer includes a Local gallery that contains a selection of 3D models Additional models can be found in the Web gallery (http://www.alice.org).

Alice is not a 3D graphics drawing program. This is why generous galleries of 3D models are provided.

Concept: Three dimensions and six directions
Objects in an Alice world are three dimensional. Each object has width, height, and depth.In terms of these three dimensions, an object "knows" which way is up or down relative to itself. Also the object understands the meaning of left and right and forward and backward. This amounts to six possible directions in which an object may move. It is important to notice that directions are with respect to the object, not the camera's point of view.

Concept: Center of an Object
Each object in Alice has a unique "center". The center point isn't calculated. Instead, it is a feature of each object that is set by a graphic artist when the 3D model is first created. Usually, the center point of an object is at the center of its bounding box, or as near to the center of mass, as the graphic artist could determine.The center point provides a reference point for a pivot or spin type of movement.

Concept: Distance
One object's distance to another is measured from its center.

Concept: Position
The center of an object is the point used as its "position" in a world. Alice automatically puts the center of the ground at the center of the world. Like the ground, any object in the world islocated relative to the center of the world.

Concept: Animation
In Alice, you will build virtual worlds and create animations by moving the objects in a world in the same way that objects are moved in a video game. The scene is drawn with objects, and then redrawn with the objects positioned in a slightly different place over and over again. Alice takes care of all the computer graphic work to create the sequence of frames. You act as the director to tell Alice what actions the objects are to perform. Alcie creates (renders) the animations.